home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual BASIC 5.0 (Ent. Edition) / Vb5ent Extractor.EXE / VB / SAMPLES / PGUIDE / PROGWOB / PWOSBUS3.CLS < prev    next >
Encoding:
Visual Basic class definition  |  1996-11-26  |  1.3 KB  |  55 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "SmallBusiness3"
  6. Attribute VB_GlobalNameSpace = False
  7. Attribute VB_Creatable = False
  8. Attribute VB_PredeclaredId = False
  9. Attribute VB_Exposed = False
  10. Option Explicit
  11. ' >> Best viewed in Full Module view. <<
  12. '
  13. ' Storage for debug ID number.
  14. Private mlngDebugID As Long
  15. Implements IDebug
  16.  
  17. ' The private Employees collection holds
  18. '   the Employee objects.
  19. Private emps As New Employees
  20.  
  21. ' Rather than declaring a variable Public
  22. '   Employees As New Employees, it's better
  23. '   coding practice to make the collection
  24. '   private, and create a read-only
  25. '   property to return the Employees
  26. '   collection.  This way, the collection
  27. '   can't get accidentally released by
  28. '   setting the public variable to
  29. '   Nothing.
  30. Public Property Get Employees() As Employees
  31.     Set Employees = emps
  32. End Property
  33.  
  34. Private Sub Class_Initialize()
  35.     mlngDebugID = DebugInit(Me)
  36. End Sub
  37.  
  38. Private Sub Class_Terminate()
  39.     DebugTerm Me
  40. End Sub
  41.  
  42. ' -------- IDebug Implementation --------
  43. '
  44. ' IDebug.DebugID gives you a way to tell
  45. ' ====== -------    objects apart.  It's
  46. '   required by the DebugInit, DebugTerm,
  47. '   and DebugShow debugging procedures
  48. '   declared in modFriend.
  49. '
  50. Private Property Get IDebug_DebugID() As Long
  51.     IDebug_DebugID = mlngDebugID
  52. End Property
  53.  
  54.  
  55.